package com.cike.sparkstudy.sql.scala

import org.apache.spark.sql.SQLContext
import org.apache.spark.{SparkConf, SparkContext}

object DataFrameCreate {
  def main(args: Array[String]): Unit = {
    val conf = new SparkConf().setMaster("local").setAppName("DataFrameOperation")
    val sc = new SparkContext(conf)

    val sqlContext = new SQLContext(sc)

    val dataFrame = sqlContext.read.json("/developerCodes/test/students.json")

    //展示jsonDF数据
    println("展示JsonDF数据")
    dataFrame.show()

  }

}
